<?php

namespace Portal\Domain;

class DictItem
{
    public function getOptions($dictCode)
    {
        $returnData = [];
        $datas = \Portal\Model\DictItem::notorm()->select('label,value,tag_type AS tagType')->where(['dict_code' => $dictCode,'status' => 1])->order('sort')->fetchAll();
        foreach ($datas as $data) {
            $returnData[] = $data;
        }
        return $returnData;
    }
}
